package top.ddandang.blog.controller;


import top.ddandang.blog.bean.GlobalResponse;
import top.ddandang.blog.model.pojo.PersonalInfo;
import top.ddandang.blog.service.PersonalInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author D
 * @since 2020-07-15
 */
@RestController
@RequestMapping("/personal-info")
public class PersonalInfoController {

    @Resource
    private PersonalInfoService personalService;

    @GetMapping("/getPersonalInfo")
    public GlobalResponse getPersonalInfo() {
        PersonalInfo personalInfo = personalService.getInformationById(0);
        return GlobalResponse.success().data("personalInfo", personalInfo);
    }
}

